import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:klfz_flutter/book/widgets/content_layer.dart';
import 'package:klfz_flutter/book/widgets/reader_overlayer.dart';
import 'package:klfz_flutter/model/chapter_result.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'logic.dart';

class BookReadPage extends StatelessWidget {

  final BookReadLogic logic = Get.put(BookReadLogic());

  @override
  Widget build(BuildContext context) {
    Chapter orgin_chapter = Get.arguments as Chapter;
    Chapter chapter = logic.getPages(orgin_chapter, 14);
    return Scaffold(
      body: Container(
        child: Stack(
          children: [
            Positioned(left: 0, top: 0, right: 0, bottom: 0, child: Image.asset('assets/img/read_bg.png', fit: BoxFit.cover)),
            ReadOverlayer(),
            ContentLayer(chapter: chapter,)
          ],
        ),
      ),
    );
  }
}
